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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.r: A = None
        self.w: G = None
        self.p: D = None
        self.o: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: A = None
        self.s: D = None
        self.w: A = None
        self.p: B = None
        self.txt = txt

b = A("b")
m = B("m")
n = C("n")
i = D("i")
h = E("h")
j = F("j")
c = G("c")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.r: A = None
        self.w: G = None
        self.p: D = None
        self.o: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: A = None
        self.s: D = None
        self.w: A = None
        self.p: B = None
        self.txt = txt

b = A("b")
m = B("m")
n = C("n")
i = D("i")
h = E("h")
j = F("j")
c = G("c")
k = F("k")

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