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

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

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

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

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

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

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

k = A("k")
e = B("e")
g = C("g")
n = D("n")
d = E("d")
l = F("l")
m = G("m")
j = G("j")

k.r = e
k.y = d
e.x = k
g.r = k
g.z = j
g.t = d
n.v = m
n.r = j
d.x = m
d.o = e
d.t = k
l.x = k
l.u = g
m.o = n
m.r = j
m.s = j
m.u = d
m.z = g
m.v = g
m.w = g
j.o = n
j.r = m
j.s = m
j.u = d
j.z = g
j.v = g
j.w = g
assert e.x.r.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

k = A("k")
e = B("e")
g = C("g")
n = D("n")
d = E("d")
l = F("l")
m = G("m")
j = G("j")

k.r = e
k.y = d
e.x = k
g.r = k
g.z = j
g.t = d
n.v = m
n.r = j
d.x = m
d.o = e
d.t = k
l.x = k
l.u = g
m.o = n
m.r = j
m.s = j
m.u = d
m.z = g
m.v = g
m.w = g
j.o = n
j.r = m
j.s = m
j.u = d
j.z = g
j.v = g
j.w = g
assert e.x.r.x.y.txt == "d"