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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.z: E = None
        self.y: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

b.x = h
b.s = h
b.t = d
b.y = f
k.p = h
k.q = l
k.t = l
k.z = j
k.y = d
d.x = f
d.z = f
d.o = f
d.u = f
d.v = l
d.q = k
l.x = b
j.p = f
j.r = k
j.o = d
f.o = h
f.q = j
f.t = d
f.r = b
h.v = j
h.o = b
assert j.p.t.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: C = None
        self.y: F = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.z: E = None
        self.y: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

b.x = h
b.s = h
b.t = d
b.y = f
k.p = h
k.q = l
k.t = l
k.z = j
k.y = d
d.x = f
d.z = f
d.o = f
d.u = f
d.v = l
d.q = k
l.x = b
j.p = f
j.r = k
j.o = d
f.o = h
f.q = j
f.t = d
f.r = b
h.v = j
h.o = b
assert j.p.t.v.x.txt == "b"