class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: A = None
        self.z: D = None
        self.u: A = None
        self.o: C = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.s: D = None
        self.txt = txt

l = A("l")
j = B("j")
g = C("g")
e = D("e")
c = E("c")
m = F("m")
h = G("h")

l.q = e
l.o = j
l.t = m
j.v = e
j.r = e
j.u = g
j.z = l
j.s = h
g.p = c
g.q = l
g.v = l
e.s = j
c.q = j
c.r = g
c.w = l
m.x = l
m.w = l
m.u = l
m.y = l
m.z = e
m.o = g
h.t = l
h.y = l
h.s = e
assert l.o.z.o.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: A = None
        self.z: D = None
        self.u: A = None
        self.o: C = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.s: D = None
        self.txt = txt

l = A("l")
j = B("j")
g = C("g")
e = D("e")
c = E("c")
m = F("m")
h = G("h")

l.q = e
l.o = j
l.t = m
j.v = e
j.r = e
j.u = g
j.z = l
j.s = h
g.p = c
g.q = l
g.v = l
e.s = j
c.q = j
c.r = g
c.w = l
m.x = l
m.w = l
m.u = l
m.y = l
m.z = e
m.o = g
h.t = l
h.y = l
h.s = e
assert l.o.z.o.s.s.txt == "e"