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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: G = None
        self.txt = txt

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

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

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

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