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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.z: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.q: B = None
        self.p: D = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.z: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.q: B = None
        self.p: D = None
        self.v: A = None
        self.txt = txt

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

c.v = f
c.o = j
c.x = n
c.w = b
c.p = l
c.r = a
n.z = j
n.p = c
b.q = l
b.y = c
b.z = f
f.r = b
f.s = n
f.w = n
f.p = n
f.v = c
a.x = n
a.y = j
a.v = j
a.w = j
a.o = c
a.r = l
l.x = f
l.s = f
l.w = b
j.u = b
j.r = f
j.p = f
j.q = n
j.v = c
m.q = l
m.y = c
m.z = f
assert f.r.z.s.z.txt == "j"