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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: E = None
        self.z: E = None
        self.q: E = None
        self.v: B = None
        self.txt = txt

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

h = A("h")
d = B("d")
j = C("j")
n = D("n")
g = E("g")
i = F("i")
m = G("m")
c = B("c")
e = A("e")
f = G("f")

h.w = m
h.x = i
h.q = i
h.y = e
d.p = i
d.u = i
d.x = h
j.v = i
n.v = i
g.z = i
g.p = i
i.o = j
i.p = g
i.z = g
i.q = g
i.v = d
m.y = j
m.t = n
c.p = i
c.u = i
c.x = h
e.w = m
e.x = i
e.q = i
e.y = h
f.y = j
f.t = n
assert c.x.x.v.x.y.q.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: E = None
        self.z: E = None
        self.q: E = None
        self.v: B = None
        self.txt = txt

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

h = A("h")
d = B("d")
j = C("j")
n = D("n")
g = E("g")
i = F("i")
m = G("m")
c = B("c")
e = A("e")
f = G("f")

h.w = m
h.x = i
h.q = i
h.y = e
d.p = i
d.u = i
d.x = h
j.v = i
n.v = i
g.z = i
g.p = i
i.o = j
i.p = g
i.z = g
i.q = g
i.v = d
m.y = j
m.t = n
c.p = i
c.u = i
c.x = h
e.w = m
e.x = i
e.q = i
e.y = h
f.y = j
f.t = n
assert c.x.x.v.x.y.q.v.x.txt == "h"