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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: E = None
        self.v: B = None
        self.u: B = None
        self.w: B = None
        self.p: E = None
        self.txt = txt

g = A("g")
i = B("i")
j = C("j")
c = D("c")
b = E("b")
d = F("d")
l = G("l")
h = B("h")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: E = None
        self.v: B = None
        self.u: B = None
        self.w: B = None
        self.p: E = None
        self.txt = txt

g = A("g")
i = B("i")
j = C("j")
c = D("c")
b = E("b")
d = F("d")
l = G("l")
h = B("h")

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