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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: C = None
        self.v: C = None
        self.y: F = None
        self.r: G = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: C = None
        self.v: C = None
        self.y: F = None
        self.r: G = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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