class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: D = None
        self.z: C = None
        self.o: D = None
        self.q: E = None
        self.p: G = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.y: E = None
        self.v: E = None
        self.o: A = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.y: G = None
        self.t: A = None
        self.r: B = None
        self.w: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

j = A("j")
c = B("c")
k = C("k")
d = D("d")
b = E("b")
l = F("l")
f = G("f")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.y: E = None
        self.v: E = None
        self.o: A = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.y: G = None
        self.t: A = None
        self.r: B = None
        self.w: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

j = A("j")
c = B("c")
k = C("k")
d = D("d")
b = E("b")
l = F("l")
f = G("f")

j.u = b
j.q = b
j.v = d
j.o = d
j.t = d
j.z = k
j.p = f
c.z = d
c.u = b
c.y = b
c.v = b
c.o = j
c.w = j
k.o = f
k.p = d
k.x = d
k.s = j
k.t = b
k.v = c
d.q = l
d.o = l
d.v = l
d.y = f
d.t = j
d.r = c
d.w = b
b.s = d
l.q = f
f.r = b
assert j.p.r.s.txt == "d"