class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.y: D = None
        self.t: C = None
        self.o: B = None
        self.s: D = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: F = None
        self.x: F = None
        self.o: E = None
        self.z: F = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.p: D = None
        self.x: E = None
        self.y: D = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: C = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: A = None
        self.txt = txt

d = A("d")
j = B("j")
i = C("i")
a = D("a")
l = E("l")
c = F("c")
f = G("f")
m = G("m")

d.v = i
d.t = i
d.r = a
d.y = a
d.s = a
d.o = j
d.p = f
j.y = i
j.p = i
j.w = i
j.s = c
j.x = c
j.z = c
j.o = l
i.w = j
i.z = d
i.p = a
i.y = a
i.s = a
i.r = a
i.x = l
a.s = c
a.z = i
a.t = i
l.z = d
c.z = l
c.r = j
f.q = i
f.w = d
m.q = i
m.w = d
assert d.o.p.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.y: D = None
        self.t: C = None
        self.o: B = None
        self.s: D = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: F = None
        self.x: F = None
        self.o: E = None
        self.z: F = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.p: D = None
        self.x: E = None
        self.y: D = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: C = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: A = None
        self.txt = txt

d = A("d")
j = B("j")
i = C("i")
a = D("a")
l = E("l")
c = F("c")
f = G("f")
m = G("m")

d.v = i
d.t = i
d.r = a
d.y = a
d.s = a
d.o = j
d.p = f
j.y = i
j.p = i
j.w = i
j.s = c
j.x = c
j.z = c
j.o = l
i.w = j
i.z = d
i.p = a
i.y = a
i.s = a
i.r = a
i.x = l
a.s = c
a.z = i
a.t = i
l.z = d
c.z = l
c.r = j
f.q = i
f.w = d
m.q = i
m.w = d
assert d.o.p.z.p.txt == "f"